﻿#pragma once
#include "fnt.hpp"

class CFNTFontManager
{
	// 使用单例	会导致析构调用比OnD3D9DestroyDevice()早
public:
	// Simple text FNT parser that reads only the fields we care about.
	// Calls ::error() if something goes wrong.
	void LoadFntFile(IDirect3DDevice9* pd3dDevice);
	const FontCharSet* GetFontCharSet(const std::wstring& FontName) const;
	void OnD3D9DestroyDevice();		// 需要调用来release纹理
private:
	std::unordered_map<std::wstring, FontCharSet> m_map_FontCharSet;		// FontName <--> FontCharSet
};